<@html.doctype />
<html>
<@html.head>
	<link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/layout_news.css" />
	<link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/component/css/text_cut.css" />
	<script type="text/javascript" src="../includes/js/jsLayout/tishi.js"></script>	
	
	<!--控制分页跳转输入验证-->
    <script type="text/javascript">
        $(function(){
            $("#direct_submit").click(function(){
                var currentPage = document.getElementById("currentPage").value;
                var patrn = /^[0-9]+$/;
                if (!patrn.test(currentPage)) {
                    $("#direct_tip").html("请输入正确数字");
                    return false;
                }
                return true;
            })
        })
    </script>
	<!--验证评论信息-->
    <script type="text/javascript">
        $(function(){
            $("#cmtsubmit").click(function(){
                var commContent = document.getElementById("commContent").value;
                if (commContent == "" || commContent == null) {
                    $("#tip1").html("评论不能为空");
                    return false;
                }
                else {
                    var commUName = document.getElementById("commUName").value;
                    if (commUName == "false") {
                        $("#tip2").html("请先登录");
                        return false;
                    }
                    else {
                        return true;
                    }
                }
            })
        })
    </script>
</@html.head>
    <body>
        <@html.header>
		<!--请不要在此处添加内容-->
		<!--用于显示文章的详细信息-->
		</@html.header>
		<@html.content><!--请在此处添加页面内容-->
        <div id="news_content">
            <div id="news_left_content">
                <div id="news_show">
                    <div class="news_title">
                        <div class="news_title_con">
                            <p class="title_one">
                                <a href="#">${articleTitle}</a>
                            </p>
                            <p>
                                <a href="#">作者：${publisherName}</a>
                                / <a href="#">文章类型：${artTypeName}</a>/ <a href="#">文章主题：${articleTopicName}</a>/ <a href="#">访问量：${visitNum}</a>/ <a href="#">发布时间：${pubTime}</a>
                            </p>
                        </div>
                    </div>
                    <div class="news_con">
                        <div class="text_nopic">
                            <p>
                                ${articleContent}
                            </p>
                        </div>
                    </div>
                </div>
                
				<br/>
				<br/>
     <!--           <div>
                    <p class="pre">
                        	上一篇：<span>吹响文化体制改革号角，掀起文化建设新高潮——对十七届六中全会《决定》的个人解读</span>
                    </p>
					<br/>
                    <p class="next">
                        	下一篇：<span>全国道德模范高校巡讲：大学生思想道德教育的触发点</span>
                    </p>
                </div>
   -->
		   		<div id="news_about">
		            <p>相关文章</p>
		            <ul>
		               	<#list articleRelatedTop4 as article>
                        	<li><a href="${base}/hatchnav/showarticledetail.action?articleID=${article.articleID}">${article.publisherName}：${article.articleTitle}</a></li>
                        </#list>
		            </ul>
		        </div>
				<br/>
				<br/>				
				
                <div class="news_box_header">
                    <#list artCommList as artComm>
                    <div class="news_box">
                        <div class="news_title_con">   
                            <p><br/>&nbsp&nbsp&nbsp&nbsp
                                ${artComm.commContent}
                            </p>
                        </div>
                        <div class="news_con">
                            <div class="text_nopic">
                            	<p>
                                	评论人：
                                <font color="red">
                                    ${artComm.commUName}
                                </font>
                                	评论时间：
                                <font color="red">
                                    ${artComm.commTime}
                                </font>
                           		</p>
                            </div>
                        </div>
                    </div>
                    </#list>									
                			
					<div align="center">
						<#if (pager.totalRows>0)>
							共<font color="red">${pager.totalRows}</font>条评论
							共<font color="red">${pager.totalPages}</font>页
							当前第<font color="red">${pager.currentPage}</font>页<br>
							<#if pager.totalPages==1>
								<a href="" class="page_first">首页</a> 
								<a href="" class="page_null">上一页</a>
								<a href="" class="page_txt">下一页</a> 
								<a href="" class="page_first">尾页</a>
							</#if>
							<#if pager.currentPage==1&&pager.totalPages!=1>
								<a href="" class="page_first">首页</a> 
								<a href="" class="page_null">上一页</a>
								<a href="${base}/hatchnav/showarticledetail.action?pageMethod=next&currentPage=${pager.currentPage}" class="page_txt">下一页</a> 
								<a href="${base}/hatchnav/showarticledetail.action?pageMethod=last" class="page_first">尾页</a>
							</#if>
							<#if pager.currentPage==pager.totalPages&&pager.totalPages!=1>
								<a href="${base}/hatchnav/showarticledetail.action?pageMethod=first" class="page_first">首页</a> 
								<a href="${base}/hatchnav/showarticledetail.action?pageMethod=previous&currentPage=${pager.currentPage}" class="page_null">上一页</a>
								<a href="" class="page_txt">下一页</a> 
								<a href="" class="page_first">尾页</a>
							</#if>
							<#if pager.currentPage!=1&&pager.currentPage!=pager.totalPages>
									<a href="${base}/hatchnav/showarticledetail.action?pageMethod=first" class="page_first">首页</a> 
									<a href="${base}/hatchnav/showarticledetail.action?pageMethod=previous&currentPage=${pager.currentPage}" class="page_null">上一页</a>
									<a href="${base}/hatchnav/showarticledetail.action?pageMethod=next&currentPage=${pager.currentPage}" class="page_txt">下一页</a> 
									<a href="${base}/hatchnav/showarticledetail.action?pageMethod=last" class="page_first">尾页</a>
							</#if>
							<form action="${base}/hatchnav/showarticledetail.action" id="form" method="post"  name="form">
								<input name="currentPage" id="currentPage" type="text" class="small" value="" size="2" />
								<input name="submit" id="direct_submit" type="submit" class="submit" value="跳转"/>
								<font class="tip"><span id="direct_tip"></font>
							</form>
						</#if>
						<#if (pager.totalRows<1)>
							<h1>暂无评论</h1>
						</#if>
			 		</div>
				
                </div>
				
                <br/>
                <br/>
                <br/>
                <br/>
                <div id="news_about_form">
                    <form id="comment" action="${base}/hatchnav/addarticlecomm.action?articleID=${articleID}">  
                     <div class="row">
                            <label for="commContent" class="small">
                                	评论信息
                            </label>
							<br/>
                            <!--<textarea name="commContent" id="commContent"  cols="50" rows="8" placeholder="请输入评论信息">
                            </textarea>-->
							<textarea name="commContent" id="commContent"  class="textarea" cols="50" rows="8" placeholder="请输入评论信息"></textarea>							
                            <font class="tip"><span id="tip1"></font>
                     </div>
                     <br/>
                        <div class="row">
                             <input name="cmtsubmit" type="submit" id="cmtsubmit" class="submit" tabindex="5" value="评论" align="right"/>
                            <font class="tip"><span id="tip2"></font>
                            	
                            <!--	<input name="commUName" type="text" id="commUName">-->
							<!--判断用户是否登录，若未登录则显示登录按钮，连接到登录界面进行登录-->
							<#if userName?exists>
							<input name="commUName" type="hidden"  id="commUName" value="true"/> 
							<#else >
							<input name="commUName" type="hidden"  id="commUName" value="false" />
							</#if>
							
                        </div>
                    </form>
                    <br/>
                </div>
            </div>
            <div id="news_right_content">
                <div id="news_search">
                    <form action="1.php" id="news_form">
                        <input type="text" name="search" id="search_1" placeholder="搜索新闻"><input type="submit" name value=" " id="search_2">
                    </form>
                </div>
                <div id="news_tags">
                    <div id="tags_title">
                        <p>热门文章</p>
                    </div>
                    <div id="tags_con">
                        <ul class="tishi">
                            <#list articleTopList as article>
                        	<li><a href="${base}/hatchnav/showarticledetail.action?articleID=${article.articleID}" title="header=[Top5文章] body=[文章标题：${article.articleTitle}<br>访问量：${article.visitNum}<br>发布时间：${article.pubTime}<br><br>]">${article.articleTitle}</a></li>
                        	</#list>
                        </ul>
                    </div>
                </div>
                <div id="news_cat">
                    <div id="cat_title">
                        <p>功能分类</p>
                    </div>
                    <div id="cat_con">
                        <ul>
                        	<li><a href="${base}/hatchnav/topubarticle.action">发布文章 +</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        </@html.content><@html.bottom><!--请不要在此处添加内容-->
        </@html.bottom>
    </body>
</html>






